<template>
    <div class="nvb_login">
        <div class="nvb_login_mask">
            <nvb_login_form @on-ok="ok"></nvb_login_form>
        </div>
    </div>
</template>

<script setup lang="ts">
import Nvb_login_form from '@/components/common/nvb_login_form.vue'
import { useRouter } from 'vue-router'

const router = useRouter()

function ok() {
    const back = window.history.state.back
    //拿不到之前的路径，跳转首页
    if (back === null) {
        router.push({ name: 'index' })
        return
    }
    router.push(back)
}
</script>

<style lang="scss">
.nvb_login {
    width: 100%;
    height: 100vh;
    background: url(/image/bg.png) 50% / cover no-repeat;

    .nvb_login_mask {
        width: 400px;
        height: 100%;
        background-color: var(--login_bg);
        position: absolute;
        right: 0;
        display: flex;
        align-items: center;
        padding: 0 40px;
    }
}
</style>
